import axios from '../AxiosConfig.js'

export const listNode = () => {
  return axios({
    method: 'get',
    url: '/api/nodes'
  })
}
export const listNodeName = () => {
  return axios({
    method: 'get',
    url: '/api/nodes'
  })
}

export const selectNode = (name, msgRates) => {
  let split = msgRates.split("_");
  return axios({
    method: 'get',
    url: '/api/nodes/' + encodeURIComponent(name),
    params: {
      "node_stats_age": split[0],
      "node_stats_incr": split[1],
    }
  })
}

export const selectNodeMemory = (name) => {
  return axios({
    method: 'get',
    url: '/api/nodes/' + name + '/memory'
  })
}




